<script>
	function drawdarea${chart.id}(){
	
		var data_${chart.id} = ${resultDatas};
		document.getElementById("div_title_${chart.id}").innerHTML="";
		
		if('${chart.type}'=='area'){
	 		document.getElementById("div_title_${chart.id}").innerHTML="<center style=\"font-size:16px;font-weight:bold;\">${chart.title?default("")}</center>"
														+"<div id=\"area-${chart.id}\" style=\"width:${chart.width};height:${chart.height};border:0px solid #A4BED4;\"></div>";
			var areaChart${chart.id} =  new dhtmlXChart({
				view:"${chart.type}",
				container:"area-${chart.id}",
			    value:"#${chart.YColumn?upper_case}#",
				color:"#00ccff",
				alpha:0.6,
				padding:{
					left:30
				},
				yAxis:{
					title:"${chart.y.display}" 
					//start:0,
					//step:1,
					//end:8
				},
				xAxis:{
					lines:true,
					title:"${chart.x.display}" ,
					template:"#${chart.XColumn?upper_case}#"
				},
				legend:{
						layout:"x",
						width: 75,
						align:"center",
						valign:"top",
						marker:{
							type:"round",
							width:15
						},
						values:[
							{text:"company A",color:"#00ccff"},
							{text:"company B",color:"#0000ff"},
							{text:"company C",color:"#cc33ff"}
						]
					}
			});
			areaChart${chart.id}.parse(data_${chart.id},"json");
	
    	}
	}
	if(${resultDatas}.length>0){
		if (window.addEventListener) {   
			// window.addEventListener('DOMContentLoaded', drawdarea${chart.id},
			// false);
			window.addEventListener('load', drawdarea${chart.id}, false);  // firefox
		} else if (window.attachEvent)  {
		  window.attachEvent('onload',drawdarea${chart.id}); // IE
		}
	}else{
		document.getElementById("div_title_${chart.id}").removeNode(true);
		var node=document.getElementById("information");
		if(node){
			node.innerHTML="<span style='color:red;font-size:14;'>提示:查询无数据!</span>";
		}
	}
	</script>